include $(HOME)/workspace/rules.mk

INCLUDES=-I$(HOME)/workspace/3rd/webapplib/include \
		 -I$(HOME)/workspace/3rd/jsoncpp/include
LIBS+=-L$(HOME)/workspace/lib -lwebapp -ljsoncpp -lcurl

OBJS=wxapi.o testwxapi.o
TARGET=testwxapi

all: SOURCE $(TARGET)

SOURCE:
	rm -rf gen-cpp; $(thriftgen) cpp WeixinAgent.thrift; cp gen-cpp/* ./;

$(OBJS): %.o: %.cpp
	$(CXX) -c $(CFLAGS) $(INCLUDES) -o $@ $<

testwxapi: testwxapi.o wxapi.o
	$(CXX) $(CFLAGS) -o $@ $^ $(LIBS)

clean :
	rm -rf $(OBJS) $(TARGET) core*
